<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$site.http_equiv.Content-language|wash}" lang="{$site.http_equiv.Content-language|wash}">
<head>
{def $node_id = $module_result.node_id
	$current_node = fetch('content', 'node', hash( 'node_id', $node_id ))
	$sitename = ezini('SiteSettings','SiteName')
	$subpage_count	= fetch( 'content', 'list_count', hash( 'parent_node_id', $module_result.path[1].node_id,
							'class_filter_type', 'include',
							'class_filter_array', ezini( 'MenuContentSettings', 'LeftIdentifierList', 'nxtri.ini' ) ) )
	$pagedesign_class = fetch( 'content', 'class', hash( 'class_id', 'template_look' ) )
	$pagedepth		= $module_result.path|count
	$section_id		= $module_result.section_id
}
{if $pagedesign_class.object_count|eq( 0 )|not}
    {def $pagedesign = $pagedesign_class.object_list[0]}
{/if}
{if and( $pagedepth|gt(1), $subpage_count|gt(0) ) }
    {def $submenu_classname = "has_submenu"}
{/if}

	{include uri="design:page_head.tpl"}
	
	<link rel="stylesheet" href={"stylesheets/site.css"|ezdesign} type="text/css" media="all" />
	
	<!--[if lt IE 7]>
		<link rel="stylesheet" href={"stylesheets/ie6.css"|ezdesign} type="text/css" media="all" />
	<![endif]-->
	
	<script type="text/javascript" src={'javascript/jquery-1.2.6.pack.js'|ezdesign}></script>
	
	<script type="text/javascript" src={'javascript/jquery.twitter.js'|ezdesign}></script>
	
	<script type="text/javascript" src={'javascript/nxtri.js'|ezdesign}></script>
	
	<script type="text/javascript" src={'javascript/thickbox.js'|ezdesign}></script>
	{section name=JavaScript loop=ezini( 'JavaScriptSettings', 'JavaScriptList', 'design.ini' ) }
	<script type="text/javascript" src={concat( 'javascript/',$:item )|ezdesign}></script>
	{/section}
</head>
<body id="node_{$node_id}" class="level_{$pagedepth} section_{$section_id}">
	<p class="hide"><a href="#content">Skip to main content</a></p>
	<div id="page_section">	
		<div id="header_section">
			<div id="header">
				
				{if $pagedesign.data_map.corporate_menu.has_content}
				<div id="corporate_menu">
					<ul>
						{foreach $pagedesign.data_map.corporate_menu.content.rows.sequential as $row}
						<li><a href="{$row.columns[1]}">{$row.columns[0]}</a>
						{/foreach}
					</ul>
				</div>
				{/if}
				
				<h1 id="logo" class="{$access_type.name}">
					<a href={"/"|ezurl}>{$sitename}</a>
				</h1>
				{if $pagedesign.data_map.show_twitter.data_int}
				{if $node_id|eq(2)}
				<div id="twitter">
				</div>
				{/if}
				{/if}
				<div id="nav">
					<h3 class="information">Main menu</h3>
					{include uri="design:menu/flat_top.tpl"}
				</div><!--End menu-->
			</div><!--End header-->
			
		</div><!--End extended_header-->
		
		
		<div id="content_section">
		<div id="breadcrumb" class="{$submenu_classname}"> 
			{include uri="design:parts/path.tpl"}
		</div><!-- End breadcrumb -->
		
		<div id="content" class="content {$submenu_classname}">
			{$module_result.content}
		</div><!-- End primary -->
		
		{if is_set( $submenu_classname )}
		<div id="aside" class="aside">
			{include uri="design:menu/sub_left.tpl"}
			{if $pagedesign.data_map.sidebar_node.has_content}
			{def $sidebar_node=$pagedesign.data_map.sidebar_node.content.main_node}
			<div class="sidebar-content">
				{attribute_view_gui attribute=$sidebar_node.data_map.body}
			</div>
			{/if}
		</div>
			
		{/if}
		{if $pagedesign.data_map.partner_node.has_content}
		<div id="partners">
			{def $partner_node=$pagedesign.data_map.partner_node.content.main_node
			$partners=fetch( content, list, hash( parent_node_id, $partner_node.node_id,
				sort_by, $partner_node.sort_array,
				class_filter_type, include,
				class_filter_array, array('company') ))
			}
			
			<h3 class="underlined"><span>{$partner_node.name|wash()}</span></h3>
			<div class="box-content">
				{foreach $partners as $partner}
				{if $partner.data_map.image.has_content}
				<div class="class-partner">
					<a href={$partner.url_alias|ezurl()} rel="external">
						{attribute_view_gui attribute=$partner.data_map.image image_class=partnerlogo}
					</a>
				</div>
				{/if}
				{/foreach}
				<p><a href={$partner_node.url_alias|ezurl()}>Go to partners</a></p>
			</div>
		</div>
		{/if}
	</div><!-- End content_wrapper -->
</div><!-- end page_wrapper -->
<div id="footer">
	{if $pagedesign.data_map.footer_text.has_content}
	    <p class="footer_text">{$pagedesign.data_map.footer_text.content}</p>
	{/if}
	<p class="credit">
		<a href="http://www.ez.no" rel="external" class="ez">Powered by Ez publish</a>
		<a href="http://www.gersh.no" rel="external" class="gersh">Design and CMS by Gerhard Sletten</a>
	</p>
</div>

{if $pagedesign.data_map.footer_script.has_content}
    {$pagedesign.data_map.footer_script.content}
{/if}

<div id="debug_wrapper">
<!--DEBUG_REPORT-->
</div>
</body>
</html>
